<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>扩展实例构造器</title>
    <script type="text/javascript" src="../assests/js/vue.js"></script>
</head>
<body>
    <h1>vue.extend 扩展实例构造器</h1>
    <hr>
    <author></author>
    <div id="author"></div>
    <script>
        var authorExtend = Vue.extend({
            template:'<p><a :href="authorURL">{{ authorName }}</a></p>',
            data:function(){
                return {
                    authorURL:"https://www.baidu.com",
                    authorName:"liangzhenmeng"
                }
            }   
        });
        //挂载
        new authorExtend().$mount("author");
        new authorExtend().$mount("#author");
    </script>
</body>
</html>